<template>
  <div class="room">
    <chat-header></chat-header>
    <chat-body></chat-body>
    <chat-foot></chat-foot>
  </div>
</template>

<script>
import ChatHeader from './ChatHeader'
import ChatBody from './ChatBody'
import ChatFoot from './ChatFoot'

export default {
  data () {
    return {
    }
  },
  beforeCreate () {
    // 获取参数
    var iss = this.$route.query.refresh
    if (iss) {
      // 跳转
      this.$router.push({path: '/room'})
      // 刷新，为啥要刷新，因为有bug
      window.location.reload()
    }
  },
  components: {
    ChatHeader,
    ChatBody,
    ChatFoot
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.room{
  position:absolute;
  background: -webkit-linear-gradient(left top, #F0F4F7 , #CBE0F1);
  background: -o-linear-gradient(top right, #F0F4F7, #CBE0F1);
  background: -moz-linear-gradient(top right, #F0F4F7, #CBE0F1);
  background: linear-gradient(to top right, #F0F4F7 , #CFEFFF);
  top:0;left:0;right:0;bottom:0;
  overflow:hidden;
}
</style>
